<include file="public@header"/>
</head>
<body>
    <div class="layui-fluid">
        <form method="post" class="layui-form js-ajax-form margin-top-20" action="{:url('LinkCategory/editPost')}">
            <div class="layui-card">
                <div class="layui-card-header">{:lang('ADMIN_LINKCATEGORY_EDIT')}</div>
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <label class="layui-form-label">{:lang('category_name')}</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="input-name" name="cat_name" value="{$data.cat_name}">
                        </div>
                    </div>
                         
                    <!-- <div class="layui-form-item">
                        <php>
                            /*
                            $type1 = $data['type']==1 ? "checked" : "";
                            $type2 = $data['type']==2 ? "checked" : "";
                            */
                        </php>
                        <label class="layui-form-label">{:lang('LINK_TYPE')}</label>
                        <div class="layui-input-block">
                            <div class="radio inline-block m-right-lg">
                                <div class="custom-radio m-right-xs">
                                    <input type="radio" id="type1" name="type" value="1" {$type1}>
                                    <label for="type1"></label>
                                </div>
                                <div class="inline-block vertical-top">
                                    {$lang['link_type_value'][1]}
                                </div>
                            </div>
                            <div class="radio inline-block m-right-lg">
                                <div class="custom-radio m-right-xs">
                                    <input type="radio" id="type2" name="type" value="2" {$type2}>
                                    <label for="type2"></label>
                                </div>
                                <div class="inline-block vertical-top">
                                    {$lang['link_type_value'][2]}
                                </div>
                            </div>
                        </div>
                    </div> -->
                    
                    <!-- 排序号 -->
                    <div class="layui-form-item">
                        <label class="layui-form-label">{:lang('SORT')}</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" name="list_order" value="{$data.list_order}">
                        </div>
                    </div>
                    <!-- 属性 -->
                    <div class="layui-form-item">
                        <php>
                            $status = ($data['status'] == 0) ? "checked" : "";
                        </php>
                        <label class="layui-form-label">{:lang('ATTRIBUTE')}</label>
                        <div class="layui-input-block">
                            <input type="checkbox" id="status" name="status" value="0" title="{:lang('IS_HIDE')}" {$status}>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="cat_id" value="{$data.cat_id}">
                            <if condition="cmf_auth_check(cmf_get_current_admin_id(), 'admin/LinkCategory/editPost')">
                                <button type="submit" class="layui-btn layui-btn-normal js-ajax-submit">{:lang('SAVE')}</button>
                            </if>
                            <a class="layui-btn layui-btn-primary" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
<include file="public@footer"/>
